/*
 * Event.h
 *
 *  Created on: 2012-12-6
 *      Author: yangentao@gmail.com
 */

#pragma once;

#include <windows.h>

namespace yet {

class _Event {
protected:
	_Event();
	virtual ~_Event();
public:
	void notify();
	DWORD wait();
	DWORD wait(DWORD timeout);
	void reset();
protected:
	HANDLE event;
};

class AutoEvent: public _Event {
public:
	AutoEvent();
};

class ManualEvent: public _Event {
public:
	ManualEvent();
};

} /* namespace yet */
